package com.yifushidai.service;

import com.yifushidai.annotation.UserHolder;
import com.yifushidai.entity.RemarkEntity;
import com.yifushidai.mapper.RemarkEntityMapper;
import com.yifushidai.utils.ErrorCodeEnum;
import com.yifushidai.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.ParseException;

@Service
public class RemarkService {
    @Autowired
    private RemarkEntityMapper remarkMapper;

    public R upremark(String remarkStr) throws ParseException {
        return R.ok().put(remarkMapper.insertSelective(RemarkEntity.builder().mobile(UserHolder.get().getMobile()).remark(remarkStr).build()));
    }
}
